<?php

// no direct access
defined('_JEXEC') or die;

$user =  &JFactory::getUser();
$lang = &JFactory::getLanguage();
$com_layout = JRequest::getVar('layout');
$components = JRequest::getVar('option');

if($lang->getTag() == 'vi-VN')
	
	$style = 'login_'.$lang->getTag();
else 
	$style = 'login_'.$lang->getTag();

if($user->id == 0): ?>
	<li class="login <?php echo $style; ?>" id="login"><a data-toggle="modal" data-target="#loginModal" href="javascript:void(null)" ><?php echo JText::_('WMC_TOP_MENU_LOGIN')?></a></li>
	<li class="space disabled" id="space"><a href="#">Space</a></li>
	<li class="signUp" id="signUp"><a data-toggle="modal" data-target="#signupModal" href="#"><?php echo JText::_('WMC_TOP_MENU_SIGNUP')?></a></li>
<?php else: ?>
	
	<li class="cart-detail" style="display: none;">
	    <a href="<?php echo JRoute::_('index.php?option=com_promotions&layout=shoppingcart&view=redemptions&Itemid=112'); ?>"><i class="fa fa-shopping-cart"></i></a>
	</li>
	<li>
		<a href="<?php echo JRoute::_('index.php?option=com_wrd&view=profile&layout=default&id=1:my-account&Itemid=170')?>">
			<i class="fa fa-user"></i>
			<span class="menu-text-inline"><?php echo empty($myProfile->f_name) ? $myProfile->member_id : $myProfile->f_name; ?></span>
		</a>
	</li>
	<li class="logged_in">
        <a href="<?php echo JRoute::_('index.php?option=com_wrd&view=profile&layout=myaccount&id=0:my-points&Itemid=119'); ?>">
            <i class="fa fa-trophy"></i>
            <span class="menu-text-inline"><?php echo number_format($myPoint,0,'.',','); ?><?php echo JText::_('WMC_TOP_MENU_POINT')?></span>
        </a>
    </li>
	<li class="logged_in">
        <a href="<?php echo JRoute::_('index.php?option=com_wrd&task=profile.logout'); ?>">
            <i class="fa fa-sign-out"></i>
            <span class="menu-text-inline"><?php echo JText::_('WMC_TOP_MENU_LOGOUT')?></span>
        </a>
    </li>
<?php endif; ?>